.box.translations

  = active_link_to edit_comfy_admin_cms_site_page_path(@site, @page), class: "btn btn-block btn-sm btn-light text-left text-truncate mb-1" do
    = content_tag(:span, @site.locale, class: "badge badge-light text-uppercase")
    = @page.label

  - @page.translations.each do |translation|
    .btn-group.btn-group-sm.d-flex.mb-1
      - url = edit_comfy_admin_cms_site_page_translation_path(@site, @page, translation)
      - published_css_class = translation.is_published? ? "published" : "draft"
      = active_link_to url, class: "#{published_css_class} translation btn text-left text-truncate btn-light w-100" do
        = content_tag(:span, translation.locale, class: "badge badge-light text-uppercase")
        = translation.label

      - url = comfy_admin_cms_site_page_translation_path(@site, @page, translation)
      = link_to url, method: :delete, data: {confirm: t(".confirm")}, class: "btn btn-danger" do
        %i.fas.fa-fw.fa-times

  = link_to t(".new"), new_comfy_admin_cms_site_page_translation_path(@site, @page), class: "btn btn-sm btn-secondary d-block mb-1"
